package pl.edu.agh.student.nn.core;

/**
 * 
 * Reprezentuje polaczenie pomiedzy neuronami. Dodatkowo przechowuje informacje
 * o kierunku i wadze polaczenia.
 *
 */
public class Connection {
    private Neuron fromNeuron;
    private Neuron toNeuron;
    private double weight;
    private double oldWeight;

    public Neuron getFromNeuron() {
        return fromNeuron;
    }

    public void setFromNeuron(Neuron fromNeuron) {
        this.fromNeuron = fromNeuron;
    }

    public Neuron getToNeuron() {
        return toNeuron;
    }

    public void setToNeuron(Neuron toNeuron) {
        this.toNeuron = toNeuron;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.oldWeight = this.weight;
        this.weight = weight;
    }

    public double getOldWeight() {
        return oldWeight;
    }
}
